//
//  Define.h
//
//
//  Created by EvanZ on 13-11-1.
//  Copyright (c) 2013年 EvanZ. All rights reserved.
//

#define DEVICE_VERSION [[[UIDevice currentDevice] systemVersion] floatValue]

#define PATH_OF_APP_HOME    NSHomeDirectory()
#define PATH_OF_TEMP        NSTemporaryDirectory()
#define PATH_OF_DOCUMENT    [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0]

#define strIsEmpty(str) ([str isEqual:[NSNull null]] || str == nil || [str length]<1 ? YES : NO )
#define strIsNull(str) ([str isEqual:[NSNull null]] ? YES : NO)

#define BASED_URL @"http://123.57.204.123"

#define USER_NAME [[NSUserDefaults standardUserDefaults] valueForKey:@"username"]
#define PASSWORD [[NSUserDefaults standardUserDefaults] valueForKey:@"password"]
#define USER_ID [[NSUserDefaults standardUserDefaults] valueForKey:@"user_id"]
#define INVITATION_CODE [[NSUserDefaults standardUserDefaults] valueForKey:@"inviatation_code"]
#define NICK_NAME [[NSUserDefaults standardUserDefaults] valueForKey:@"account_name"]
#define USER_RANK [[NSUserDefaults standardUserDefaults] valueForKey:@"user_rank"]
#define PHONE [[NSUserDefaults standardUserDefaults] valueForKey:@"phone"]


#define USER_INFO_HEADER [NSString stringWithFormat:@"%@:%@",[[NSUserDefaults standardUserDefaults] valueForKey:@"username"],[[NSUserDefaults standardUserDefaults] valueForKey:@"password"]]

#define NOTI_LOGIN_SUCC @"login_success"

enum takePhotoType {
    type_camera = 0,
    type_photoLibrary = 1,
};
